package com.ea.admin.pojo.param.file;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UploadFileParam {
    @ApiModelProperty(value = "文件标识MD5", required = true)
    @NotBlank(message = "文件标识不能为空")
    private String md5;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "文件内容", required = true)
    private MultipartFile file;

    @ApiModelProperty(value = "文件类型", required = true)
    @NotBlank(message = "文件类型不能为空")
    private String type;
}
